local ItemData = require("bag.Proto").ItemData
local HeroSimple = require("hero.Proto").HeroSimple
local RoleBase = require("role.Proto").RoleBase 
local CombatSkillConf = require("combat.Proto").CombatSkillConf

-- 进入战役界面的查询
CG_BATTLE_QUERY = {}

Tongguan = {
    {"reward",10,ItemData},               -- 道具 
	{"heroReward",2,HeroSimple},           -- 武将展示
    {"status",1,"byte"},                  -- 状态
    {"levelName",1,"string"},             -- 所需通关
    {"index",1,"int"},                    -- 奖励索引
    {"nowBattle",1,"string"},             -- 当前通关关卡
}

-- 通关信息
BattleShark = {
    {"roleBase",    1,  RoleBase},                        -- 角色信息
    {"type",        1,  "byte"},                          -- 类型  1 战力  2最快  3 最近
    {"param",       1,  "int"},                         -- 参数  战力 or 通关时间 or 挑战时间
    {"videoUuid",   1,  "string"},                         -- 战斗记录
}

-- 世界地图
BattleWorldMap  = {
    {"mapID",       1,  "byte"},                            -- 地图ID
    {"mapName",     1,  "string"},                          -- 地图名称
    {"mapBuild",    1,  "int"},                             -- 地图建筑
    {"mapBg",       1,  "int"},                             -- 地图背景
    {"mapPos",      2,  "int"},                             -- 地图坐标
    {"status",      1,  "byte"},                            -- 地图状态  1 已解锁   2 未解锁
    {"story",       1,  "string"},                          -- 背景故事
    {"maxLevel",    1,  "byte"},                            -- 最大进度
    {"curLevel",    1,  "byte"},                            -- 当前进度
    {"chapterReward",   40,  ItemData},                          -- 大关卡奖励
    {"chapterDot",      1,  "byte"},                            -- 是否可以奖励
    {"roleList",    3,  RoleBase},                          -- 在此关卡的玩家
}

-- 关卡信息九 零 一 起玩 www.9 01  7 5.com 
BattleNodeInfo = {
    {"nodeName",    1,"string"},                    -- 关卡名
    {"battleID",    1,"int"},                       -- 关卡ID
    {"needLv",      1,"int"},                       -- 关卡需要等级
    {"needZDL",     1,"int"},                       -- 关卡需要战斗力
    {"hasSuipian",  1,"byte"},                      -- 关卡是否有碎片
}

BattlePosNet = {
	{"battleID",	  1,	  "int"},
	{"posX",		  1,	  "short"},	   -- 坐标x
	{"posY",		  1,	  "short"},	   -- 坐标y
	{"roleBase",	  2,	  RoleBase},   -- 最快通关玩家信息 数组长度0表示没有
	{"nodeName",	  1,	  "string"},
	{"isBig",		  1,	  "byte"},	   -- 是否大关卡
}

BattleExtraDataSSZH = {
	{"posList",			50,		BattlePosNet},
}

-- 模型信息
BattleBody = {
    {"body",1,"int"},               -- 模型
    {"atkId",1,CombatSkillConf},    -- 普攻
    {"skill",1,CombatSkillConf},    -- 技能
    {"pos",1,"byte"},               -- 位置
    {"hp",1,"int"},                 -- 血量
    {"atkType",1,"byte"},           -- 1 近战 2 远程
}                       

-- 战斗记录结构体
CombatVideoStruct = {
    {"ownBody",6,BattleBody},       -- 己方
    {"enemyBody",6,BattleBody},     -- 敌方
}

-- 挂机界面查询
GC_BATTLE_QUERY = {
	{"nowBattleID",	    1,	    "int"},	                -- 下一战斗节点id
	{"nodeName",	    1,	    "string"},	            -- 下一战斗节点名
	{"nodeID",		    1,	    "int"},                 -- 下一战斗节点ID
	{"needLv",		    1,	    "int"},                 -- 下一战斗节点所需玩家等级
    {"maxBattleID",     1,      "int"},                 -- 最大的id
	{"mapID",		    1,	    "int"},                 -- 当前挂机地图ID
	{"mapName",		    1,	    "string"},              -- 当前挂机地图名字
	{"bg",			    1,	    "int"},                 -- 当前挂机地图背景图
	{"sceneID",			1,	    "int"},                 -- 战斗场景
    {"time",            1,      "int"},                 -- 已挂机时间
    {"maxTime",         1,      "int"},                 -- 最大可挂机时间
	{"canBattle",		1,	    "byte"},	            -- 能否战斗
	{"canMopup",		1,	    "byte"},	            -- 能否免费扫荡
	{"xushang",		    1,	    "int"},	                -- 悬赏情报数量
	{"xushangMax",		1,	    "int"},	                -- 悬赏情报上限
	{"xsDot",		    1,	    "byte"},	            -- 悬赏红点
	{"doubleCnt",       1,      "byte"},
	{"tongguan",	    2, 	    Tongguan},              -- 通关奖励 长度为0不需要展示
    {"extraDataSSZH",	1,		BattleExtraDataSSZH},	-- 额外数据（闪烁战火）
    {"videoInfo",       1,      CombatVideoStruct},     -- 播放数据
}

-- 世界地图
CG_BATTLE_WORLD_MAP_QUERY = {
}

GC_BATTLE_WORLD_MAP_QUERY = {
    {"worldMap",100,BattleWorldMap},           -- 世界地图
}

-- 当前关卡玩家查询
CG_BATTLE_WORLD_MAP_ROLELIST_QUERY = {
    {"worldMapId",1,"int"},                     -- 世界地图ID
}

GC_BATTLE_WORLD_MAP_ROLELIST_QUERY = {
    {"roleList",50,RoleBase},                    -- 在次关卡的玩家
}

-- 战斗节点查询
CG_BATTLE_NODE_QUERY = {
    {"mapID",1,"int"},                      -- 地图ID
}

GC_BATTLE_NODE_QUERY = {
    {"battleID",1,"int"},                           -- 自己所在关卡
    {"nodeInfo",20,BattleNodeInfo},                 -- 节点信息
}


-- 收获基础收益
CG_BATTLE_HANG_QUERY = {}

GC_BATTLE_HANG_QUERY = {
    {"time",		    1,	    "int"},
    {"maxTime",		    1,	    "int"},
    {"items",		    50,	    ItemData},	
	{"exp",			    1,	    "int"},	            --经验
	{"jinbi",		    1,	    "int"},	            --金币
	{"greenExp",	    1,	    "int"},	            --绿魂	
    {"qingbao",         1,      "int"},             --情报
}

CG_BATTLE_HANG_GET = {}


-- 战役节点详细信息查询
CG_BATTLE_NODE_DETAIL_QUERY = {
	{"battleID",	  1,	  "int"},
}
GC_BATTLE_NODE_DETAIL_QUERY = {
	{"battleID",	  1,	    "int"},
	{"exp",			  1,	    "int"},	            --经验
	{"jinbi",		  1,	    "int"},	            --金币
	{"greenExp",	  1,	    "int"},	            --绿魂	
	{"qingbao",	      1,	    "int"},	            --情报
	{"items",		  60,	    ItemData},		            
    {"nodeName",      1,        "string"},                        -- 当前关卡，字符串
}

-- 战役章节(地图)收益查询
BattleMapDropItemsNet = {
	{"mapID",		  1,		"int"},
	{"mapName",		  1,		"string"},
	{"isOpen",		  1,		"byte"},
}
CG_BATTLE_MAP_DROPITEMS_LIST = {}
GC_BATTLE_MAP_DROPITEMS_LIST = {
	{"list",		  60,		BattleMapDropItemsNet},
}
CG_BATTLE_MAP_DROPITEMS_DETAIL = {
	{"mapID",		  1,		"int"},	
}
GC_BATTLE_MAP_DROPITEMS_DETAIL = {
	{"mapID",		  1,		"int"},
	{"items",		  60,		ItemData},	
}

-- 挂机收益增加提示
GC_BATTLE_REWARD_UP = {
	{"itemExp",		  1,	  ItemData},	            	
	{"itemJinbi",	  1,	  ItemData},	            	
	{"itemGreenExp",  1,	  ItemData},	                 	
	{"itemQingbao",   1,	  ItemData},	        	
	{"expOld",		  1,	  "int"},	            --经验
	{"expNew",		  1,	  "int"},	            --经验
	{"jinbiOld",	  1,	  "int"},	            --金币
	{"jinbiNew",	  1,	  "int"},	            --金币
	{"greenExpOld",	  1,	  "int"},	            --绿魂
	{"greenExpNew",	  1,	  "int"},	            --绿魂
	{"qingbaoOld",	  1,	  "int"},	            --情报
	{"qingbaoNew",	  1,	  "int"},	            --情报
}


-- 设置战役挂机节点/进入下一章
CG_BATTLE_NODE_SET = {
	{"battleID",	  1,	  "int"},
}

GC_BATTLE_NODE_SET = {}


-- 战役界面假打的小人查询
CG_BATTLE_HANG_FIGHT = {}

HangFightNet = {
	{"body",		1,	"int"},
	{"fireType",	1,	"short"},
	{"attackEffect",1,	"string"},
	{"flyEffect",	1,	"string"},
	{"flyCoords",   1,  "string"},
	{"hitEffect",	1,	"string"},
	{"height",		1,	"short"},
	{"weight",		1,	"short"},
	{"hitSound",	1,	"string"},
}

GC_BATTLE_HANG_FIGHT = {
	{"attackerList",		6,	  HangFightNet},
	{"monsterList",		    6,	  HangFightNet},
}

-- 收菜提醒
GC_BATTLE_HANG_TIME_SPILL = {
	{"time",          1, "int"},
}

-- 快速作战
CG_BATTLE_MOPUP_FIGHT = {
    
}

GC_BATTLE_MOPUP_FIGHT = {
	{"exp",			  1,	  "int"},	            --经验
	{"jinbi",		  1,	  "int"},	            --金币
	{"greenExp",	  1,	  "int"},	            --绿魂	
	{"qingbao",	      1,	  "int"},	            --情报
    {"item",40,ItemData},
	{"double",        1,      "byte"},
}

-- 扫荡查询
CG_BATTLE_MOPUP_QUERY = {
}

GC_BATTLE_MOPUP_QUERY = {
    {"item",            50,     ItemData},                       -- 物品
    {"leftCnt",         1,      "byte"},                       -- 剩余扫荡次数
    {"need",            1,      "int"},                           -- 扫荡花费钻石
    {"vip",             1,      "byte"},                           -- 是否是vip
    {"nowCnt",          1,      "byte"},                        -- 当前已扫荡次数
	{"exp",			    1,	    "int"},	            --经验
	{"jinbi",		    1,	    "int"},	            --金币
	{"greenExp",	    1,	    "int"},	            --绿魂	
    {"qingbao",         1,      "int"},             --情报
    {"name",            1,      "string"},             --情报
}

-- 通关奖励领取
CG_BATTLE_TONGGUAN_REWARD_GET = { 
    {"index",1,"int"},
}

-- 回到征战界面
GC_BATTLE_GOBACK_MAIN = {
	{"panelIDs",	5,		"short"},
}

-- 通关战报查询
CG_BATTLE_SHARK_QUERY = {
    {"battleID",1,"int"},               -- 关卡
}

GC_BATTLE_SHARK_QUERY = {
    {"battleShark",3,BattleShark},         --战报
}

--大关卡通关后领取奖励
CG_BATTLE_CHAPTER_REWARD = {
    {"mapID", 1, "byte"},
}

GC_BATTLE_CHAPTER_REWARD = {
    {"mapID", 1, "byte"},
}